package com.smarth.zhizulian.http.observer.inter;

import android.content.Context;

import com.smarth.zhizulian.http.observer.inter.BaseObserver;
import com.smarth.zhizulian.utils.listhelper.inter.ResponseSender;

/**
 * Created by 18865 on 2018/1/11.
 */

public abstract class IRefreshObserver<T> extends BaseObserver<T> {
    protected ResponseSender mResponseSender;

    public IRefreshObserver(Context context, ResponseSender responseSender) {
        super(context);
        mResponseSender = responseSender;
    }

    @Override
    public void onNext(T t) {
    }

    @Override
    public void onError(Throwable e) {
        super.onError(e);
        mResponseSender.sendError(null);
    }
}
